<template>
  <Tree
    :data="data4"
    show-checkbox
    multiple
    ref="tree"
    @on-check-change="choice"
    class="tree1"
  ></Tree>
  <!-- <Tree :data="choices" class="tree2"></Tree> -->
</template>
<script>
export default {
  data() {
    return {
      subdata: [], //用户半选和全选的数据
      choices: [], //在右边需展示出来的数据
      power: [], //用户全选的数据
      data4: [
        {
          title: '医生',
          expand: false, //是否展开
          children: [
            {
              title: '看诊',
              expand: true,
              children: [
                {
                  title: '方法',
                  expand: true,
                  children: [
                    { title: '望' },
                    { title: '闻' },
                    { title: '问' },
                    { title: '切' }
                  ]
                },
                {
                  title: '写病历'
                }
              ]
            },
            {
              title: '开药',
              expand: true,
              children: [{ title: '查看药房库存' }, { title: '进行开药' }]
            }
          ]
        }
      ]
    }
  },
  methods: {
    // onSelect(keys, event) {
    //   console.log('Trigger Select', keys, event)
    // },
    // onExpand() {
    //   console.log('Trigger Expand')
    // }
  }
}
</script>
